from GuoQing10_1.zy1.Base import Base
from selenium.webdriver.common.by import By
import time

class Page(Base):
    #点击登录
    login_loc = (By.CSS_SELECTOR,'.headerLogin')
    def login(self):
        self.click(self.login_loc)
    #输入用户名
    name_loc = (By.NAME,'uname')
    def name(self):
        self.send_keys(self.name_loc,'18615488780')
    #输入密码
    pwd_loc = (By.NAME, '_pwd')
    def pwd(self):
        self.send_keys(self.pwd_loc, 'lr123456.')
    #点击登录按钮
    anniu_loc = (By.ID,'save')
    def anniu(self):
        self.click(self.anniu_loc)
    #确定
    que_loc = (By.CLASS_NAME,'bindSub')
    def que(self):
        self.click(self.que_loc)

    def test_login_01(self):
        self.goto('https://www.jiuxian.com/')
        self.login()
        self.name()
        self.pwd()
        time.sleep(15)
        self.anniu()
        self.que()
        time.sleep(5)
